// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router/router'
import axios from 'axios'
import iview from 'iview'
import 'iview/dist/styles/iview.css'   // 使用 CSS

Vue.use(iview);

Vue.config.productionTip = false;
localStorage.setItem('userId', '1234');
// 全局的axios的配置
axios.defaults.baseURL = 'http://localhost:12305';
axios.defaults.headers.common['userId'] = localStorage.getItem('userId');
axios.defaults.headers.common['userType'] = localStorage.getItem('userType');
axios.defaults.headers.common['token'] = localStorage.getItem('token');

// axios.defaults.headers.get['userId'] = 'application/x-www-form-urlencoded'
/* eslint-disable no-new */

new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: {App}
});
